package com.xdcplus.web.common.enums.mm;

/**
 * 入库和出库类型
 * @Description
 * @Author xyy
 * @Date 2023/5/27 11:17
 */

public enum MmStockTypeEnum {
    WMS_INPUT_TYPE("WMS_INPUT", "原料入库"),
    WORK_INPUT_TYPE("WORK_INPUT", "现场领料"),
    WORK_OUTPUT_TYPE("WORK_OUPUT", "现场退料"),
    ADJUST_INPUT_TYPE("ADJUST_INPUT", "调整入库"),
    ADJUST_OUPUT_TYPE("ADJUST_OUPUT", "调整出库"),
    WMS_OUTPUT_TYPE("WORK_OUPUT", "生产退料"),
    ;

    MmStockTypeEnum(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public static String getMsgByCode(String code)
    {
        for(MmStockTypeEnum mmStockTypeEnum:values())
        {
            if(mmStockTypeEnum.getCode().equals(code))
            {
                return mmStockTypeEnum.getMsg();
            }
        }
        return  null;
    }

    private String code;

    private String msg;
    public String getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
